package portal.action.rest;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.RestController;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import portal.cmd.JHostsServices;
import portal.cmd.beans.JhostBean;

@RestController
@RequestMapping("/cmd/jhosts/")
public class CmdJhosts {
		@Autowired
		JHostsServices jHostsServices;
		@RequestMapping(value="/runstat",method=RequestMethod.GET)
		public List<JhostBean> getMAX(String nodes){
			//System.out.println(nodes);
			//return null;
			return jHostsServices.getHosts(nodes.split(","));
		}
}
